package com.gemframework.modules.extent;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.gemframework.model.common.BaseResultData;
import com.gemframework.service.AdvertisementService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@CrossOrigin
@RequestMapping("/Advertisement")
public class AdvertisementAPI {

    @Resource
    private AdvertisementService advertisementService;

    //根据id查询广告表信息
    @GetMapping("/selAdvertisementById")
    public BaseResultData selAdvertisementById(Integer id){
        return BaseResultData.SUCCESS(advertisementService.getById(id));
    }

    //查询广告表信息
    @PostMapping("/selAdvertisementList")
    public BaseResultData selAdvertisementList(){
        return BaseResultData.SUCCESS(advertisementService.list());
    }

}
